//接口文档


  export const baseUrl = "https://apis.60kongjian.com"
  // export const baseUrl = "https://api.release.60kongjian.top"
 // export const baseUrl = "https://llkjcircle.qianxiao.wang"
  // export const baseUrl = "http://llkj-ms-sys.com"


     // var token = store.state.userInfo.token || (uni.getStorageSync('userInfo').token || undefined)
// let token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ3d3cuZ291Z3VjbXMuY29tIiwiYXVkIjoiZ291Z3VjbXMiLCJpYXQiOjE2NzgwODE0MTgsImV4cCI6MTY4NjcyMTQxOCwidWlkIjoxNDN9.aHC63w7rvaFEDkx8-elQuEVCORtqG209VbUcP9HJAFg"
export const header = {
		'Api-Client':'llkj',
	    'Api-Version' : 'v1',
		//'Authorization': 'Bearer ' ,
}

//请求接口配置
const config={
	header,
	custom: {baseURL: baseUrl,  load:false,},
}



const http = uni.$u.http
export const api = {}
//是否暂存动态接口
api.postuserstagingdynamic = (params) => http.post('/circle/dynamic/getuserstagingdynamic', params,config)
//上传文件
api.getHomeSojourn = (params) => http.upload('/circle/dynamic/uploadfile', params,config)
//频道 plate_id = 1
api.postchannellist = (params) => http.post('/circle/dynamic/channellist', params,config)
//校验文本内容
api.postchecktext = (params) => http.post('/circle/dynamic/checktext', params,config)
//校验图片
api.postcheckimg = (params) => http.post('/circle/dynamic/checkimage', params,config)
//发布动态
api.postpublishdynamic = (params) => http.post('/circle/dynamic/publishdynamic', params,config)

//选择话题列表
api.posttopiclist = (params) => http.post('/circle/topic/topiclist', params,config)

//圈子列表
// api.getcirclelist = (params = {params:{}}) => http.post('circle/dynamic/channellist',{params})
api.getcirclelist = (params) => {
    return http.post('circle/dynamic/channellist',{...params},config)
}
                                

api.getDynamiclist = (params) => {
    return http.post('circle/dynamic/getdynamiclist', {...params},config)
}

// 团期动态列表
api.getgroupperioddynamiclist = (params) => {
    return http.post('circle/dynamic/getgroupperioddynamiclist', {...params},config)
}
// 发布团期动态关联信息
api.getproductrelationshipinfo = (params) => {
    return http.post('circle/dynamic/getproductrelationshipinfo', {...params},config)
}
//用户关注/取关
api.follow = (params) => {
	console.log(params)
    return http.post('circle/fans/follow',{...params}, {...config})
}

// 点赞
api.help = (params) => {
    return http.post('circle/dynamic/like',{...params},config)
}
// 我的动态信息
api.circeuser =  (params) => {
    return http.post('circle/user/userdynamiclist',{...params},config)
}
// 他的关注列表
api.circeherlist =  (params) => {
    return http.post('circle/fans/userfollowlist',{...params}, config)
}
//用户主页信息

api.heruserlist =  (params) => {
    return http.post('circle/user/getuserinfo',{...params}, config)
}
//选择话题列表

api.topiclist =  (params) => {
    return http.post('circle/topic/topiclist',{...params}, config)
}
// 话题详情
api.topdetil =  (params) => {
    return http.post('circle/topic/topicinfo',{...params}, config)
}
//话题动态列表
api.toprunList =  (params) => {
    return http.post('circle/topic/dynamiclist',{...params}, config)
}
//话题热榜
api.hotdiscussionList =  (params) => {
    return http.post('circle/topic/hotdiscussionlist',{...params}, config)
}
// 我的话题热榜/
api.getmytopicranking =  (params) => {
    return http.post('circle/topic/getmytopicranking',{...params}, config)
}
// 他的粉丝列表
api.herfanslist =  (params) => {
    return http.post('circle/fans/userfanslist',{...params}, config)
}
// 查看动态详情
api.getcircledeail =  (params) => {
    return http.post('circle/dynamic/getdynamicinfo',{...params}, config)
}
// 评论回复
api.circlecomment =  (params) => {
    return http.post('circle/comment/add',{...params},config)
}
//评论支持和反对
api.supportoragainst =  (params) => {
    return http.post('circle/comment/supportoragainst',{...params},config)
}

//删除评论   ?id=74
api.commentDel =  (params) => {
    return http.get('circle/comment/del',
	  {
	  	params:{
	  		...params
	  	},
	      ...config
	  },
	)
}

// 获取评论
api.getpinglun =  (params) => {
    return http.get('circle/comment/list',{
		params:{
			...params
		},
        ...config
    })
}
// 获取未读消息数量
api.getmsglist =  (params) => {
    return http.get('circle/msg/count',{
		params:{
			...params
		},
        ...config
    })
}
// 获取未读消息列表
api.getmsgdeail =  (params) => {
    return http.get('circle/msg/list',{
		params:{
			...params
		},
        ...config
    })
}
api.getusertoplist =  (params) => {
    return http.post('circle/dynamic/followdynamiclist',{...params},config)
}
// 删除动态
api.delcircledeail =  (params) => {
    return http.post('circle/dynamic/deldynamic',{...params},config)
}

// 推荐关注
api.tuijianlist =  (params) => {
    return http.post('circle/fans/getrecommenduser',{...params},config)
}

//分享
api.dynamicShare =  (params) => {
    return http.post('/circle/dynamic/share',{...params},config)
}
//修改个人简介
api.etituserin =  (params) => {
    return http.post('/circle/user/edituserdescription',{...params},config)
}


// ---------话题---------

//话题列表
api.postRecommendtopiclist = (params)=>{
	 return http.post('/circle/topic/recommendtopiclist',{...params},config)
}
//热门话题
api.postHottopiclist = (params)=>{
	 return http.post('/circle/topic/hottopiclist',{...params},config)
}


//---------小组--------------------

//推荐小组
api.postRecommendgroup = (params)=>{
	 return http.post('/circle/group/getrecommendgroup',{...params},config)
}
// 选择小组
api.postChoosegroup = (params)=>{
	 return http.post('/circle/group/getchoosegroup',{...params},config)
}
//热门小组
api.postHotgrouplist = (params)=>{
	 return http.post('/circle/group/hotgrouplist',params,config)
}
//小组成员列表
api.postGroupuserlist = (params)=>{
	 return http.post('/circle/groupuser/groupuserlist',{...params},config)
}
//小组组长信息
api.postGroupheadman = (params)=>{
	 return http.post('/circle/groupuser/getgroupheadman',{...params},config)
}
//小组主页信息
api.postGroupinfo = (params)=>{
	 return http.post('/circle/group/groupinfo',params,config)
}
//小组设置主页信息
api.postGroupsettinginfo = (params)=>{
	 return http.post('/circle/group/groupsettinginfo',params,config)
}
//小组 更新小组信息
api.postupdategroupinfo = (params)=>{
	 return http.post('/circle/group/updategroupinfo',params,config)
}
//小组示例背景
api.getexamplebackimages = (params)=>{
	 return http.post('/circle/group/getexamplebackimages',params,config)
}
//设置小组背景
api.setgroupbackimage = (params)=>{
	 return http.post('/circle/group/setgroupbackimage',params,config)
}
//我的小组
api.postMygroup = (params)=>{
	 return http.post('/circle/group/mygroup',params,config)
}
//小组介绍
api.postGroupintroduce = (params)=>{
	 return http.post('/circle/group/groupintroduce',params,config)
}
//小组 加入和退出
api.postJoingroup = (params)=>{
	 return http.post('/circle/groupuser/joingroup',params,config)
}
//小组 移除小组
api.postGroupmovegroupuser= (params)=>{
	 return http.post('/circle/groupuser/movegroupuser',params,config)
}
//小组 禁言/解禁
api.postGroupProhibition= (params)=>{
	 return http.post('/circle/groupuser/prohibition',params,config)
}
//小组 小组点赞/取消点赞
api.postLikegroup= (params)=>{
	 return http.post('/circle/group/likegroup',params,config)
}
//小组 转让
api.postGroupTransferheadman= (params)=>{
	 return http.post('/circle/groupuser/transferheadman',params,config)
}
//小组 邀请好友小组信息
api.postGroupInviteinfo = (params)=>{
	 return http.post('/circle/group/inviteinfo',params,config)
}
//小组主页  帖子列表  type:筛选类型:1-最热,2-最新 ; group_id 小组id; page 和 per_page 
 api.postGroupArticlelist = (params)=>{
 	 return http.post('/circle/article/getarticlelist',params,config)
 }
//帖子详情 article_id:帖子id  
api.postArticleinfo = (params)=>{
 	 return http.post('/circle/article/getarticleinfo',params,config)
}
//帖子点赞/取消点赞 article_id:帖子id  
api.postArticleLike = (params)=>{
 	 return http.post('/circle/article/like',params,config)
}
//帖子发布
api.postPublisharticle = (params)=>{
 	 return http.post('/circle/article/publisharticle',params,config)
}
//帖子暂存动态信息
api.postuserstagingarticle = (params)=>{
 	 return http.post('/circle/article/getuserstagingarticle',params,config)
}
//帖子删除
api.postDelarticle = (params)=>{
 	 return http.post('/circle/article/delarticle',params,config)
}

//动态
api.posthotdynamiclist = (params)=>{
 	 return http.post('/circle/dynamic/gethotdynamiclist',params,config)
}

//-------用户-----
//获取用户的头像和昵称
api.postUsernicknameandavatar = (params)=>{
 	 return http.post('/circle/user/getusernicknameandavatar',params,config)
}
//修改用户头像和昵称
api.postUpdateuserinfo = (params)=>{
 	 return http.post('/circle/user/updateuserinfo',params,config)
}
// 新加分享海报（话题）
api.postInviteinfo = (params)=>{
 	 return http.post('/circle/topic/inviteinfo',params,config)
}
//话题主页弹幕
api.postBarragelist = (params)=>{
 	 return http.post('/circle/topic/barragelist',params,config)
}
// 测一测start
// 列表
api.postTestList = (params)=>{
	 return http.post('/circle/questionnaire/getquestionnairelist',params,config)
}
// 问题详情
api.postTestDetil = (params)=>{
	 return http.post('/circle/questionnaire/getquestionnairedetail',params,config)
}
// 记录答题时间（开始，结束）
api.postRecordTestTime = (params)=>{
	 return http.post('/circle/questionnaire/recordquestion',params,config)
}
// 答题提交
api.postaAnswerText = (params)=>{
	 return http.post('/circle/questionnaire/answerquestion',params,config)
}
// 结果详情
api.postTestAnswerDetil = (params)=>{
	 return http.post('/circle/questionnaire/getuserreport',params,config)
}
// 问卷推荐商品

api.postRecommendProduct = (params)=>{
	return http.post('/circle/questionnaire/recommendproduct',params,config)
}
// 测一测end



// 获取用户足迹的商品
api.postUserProduct = (params)=>{
	 return http.post('/circle/dynamic/getuserproduct',params,config)
}
// 所有商品
api.postAllProduct = (params)=>{
	 return http.post('/circle/dynamic/getallproduct',params,config)
}


//检测用户是否填写测一测
api.postCheckuserhasrecord = (params)=>{
	 return http.post('/circle/questionnaire/checkuserhasrecord',params,config)
}


//保存图片资源到数据表
api.postCircleDynamicSavefiles = (params)=>{
	 return http.post('/circle/dynamic/savefiles',params,config)
}


// 帖子动态合并后
api.postDongtaiList = (params)=>{
	 return http.post('/circle/article/getarticlelistmerge',params,config)
}
// 看一看列表
api.getLookvideoList = (params) => {
    return http.post('/circle/dynamic/getlookvideolist',params,config)
}

// 发布动态
api.getCircleMsg=  (params) => {
    return http.get('/circle/msg/dynamic/submit',{
		params:{
			...params
		},
        ...config
    })
}
// 看一看id获取列表
api.getlookvideolistnext = (params) => {
    return http.post('/circle/dynamic/getlookvideolistnext',params,config)
}

// 我的点赞
api.getMylikedynamiclist = (params) => {
    return http.post('/circle/user/mylikedynamiclist',params,config)
}



api.getactivityinfo = (params) => {
    return http.post('/circle/activity/getactivityinfo',params,config)
}
// 活动签到
api.getactivitysignin = (params) => {
    return http.post('/circle/activity/signin',params,config)
}
// 看一看海报二维码

api.gettakeLookERma = (params) => {
    return http.post('/circle/dynamic/getvideocodeurl',params,config)
}

// 评价相关
api.getProductevaluateLabel = (params) => {
    return http.post('/circle/evaluate/getproductevaluatelabel',params,config)
}
// 发表评价
api.publisValuate = (params) => {
    return http.post('/circle/evaluate/publishevaluate',params,config)
}
// 商品详情笔记信息
api.getProducttravelnotes = (params) => {
    return http.post('/circle/evaluate/getproducttravelnotes',params,config)
}
// 商品笔记列表
api.getProducttravelnotesList = (params) => {
    return http.post('/circle/evaluate/getproducttravelnoteslist',params,config)
}
// 订单评价详情
api.getOrderevaluateDetail = (params) => {
    return http.post('/circle/evaluate/getorderevaluatedetail',params,config)
}
// 二维码进来的是否可以评价
api.getProductinfo = (params) => {
    return http.post('/circle/evaluate/getproductinfobygroupperiodid',params,config)
}
// 付款页详情
api.getquickcollectiondata = (params) => {
    return http.post('/circle/quickcollection/getquickcollectiondata',params,config)
}
// 创建幸福豆快速收款订单
api.creatxinfudouorder = (params) => {
    return http.post('/circle/quickcollection/creatxinfudouorder',params,config)
}